package jwdt.xadmin.info.bean;

import java.util.List;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;
import com.ezerg.fastjson.annotation.JSONField;

@SuppressWarnings("rawtypes")
@Table(name="t_type", keys={"id"}, comment="")
public class TType implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="id", comment="栏目ID")
	private Integer id;
	
	@Column(value="fid", comment="上级栏目ID")
	private Integer fid;
	
	@Column(value="name", comment="栏目名称")
	private String name;
	
	@Column(value="content", comment="栏目内容")
	private String content;
	
	@Column(value="mode", comment="模板")
	private Integer mode;
	
	@Column(value="px", comment="排序")
	private Integer px;
	
	@Column(value="zt", comment="状态")
	private Integer zt;
	
	@Column(value="bview", comment="后台显示")
	private Integer bview;
	
	@Column(value="fview", comment="导航显示")
	private Integer fview;
	
	@Column(value="url", comment="链接")
	private String url;
	
	@Column(value="typetemp", comment="栏目模版")
	private String typetemp;
	
	@Column(value="infotemp", comment="内容模版")
	private String infotemp;
	
	@Column(value="page", comment="内容模版")
	private Integer page;
	
	@Column(value="pageSize", comment="内容模版")
	private Integer pageSize;
	
	@Column(value="typezt", comment="栏目静态化状态")
	private Integer typezt;
	
	@Column(value="infozt", comment="内容静态化状态")
	private Integer infozt;
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getFid() {
		return fid;
	}

	public void setFid(Integer fid) {
		this.fid = fid;
	}

	@JSONField(serialize=false)
	public List getChildren() {
		return Jdb.get().query(this.getClass(),"bview=1 AND fid="+this.id+" ORDER BY px");
	}
	
	@JSONField(serialize=false)
	public List getAllChildren() {
		return Jdb.get().query(this.getClass(),"fid="+this.id+" ORDER BY px");
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public String getContent() {
		return content;
	}
	
	public void setContent(String content) {
		this.content = content;
	}
	public Integer getMode() {
		return mode;
	}
	
	public void setMode(Integer mode) {
		this.mode = mode;
	}
	public Integer getPx() {
		return px;
	}
	
	public void setPx(Integer px) {
		this.px = px;
	}
	public Integer getZt() {
		return zt;
	}
	
	public void setZt(Integer zt) {
		this.zt = zt;
	}
	public Integer getBview() {
		return bview;
	}
	
	public void setBview(Integer bview) {
		this.bview = bview;
	}
	public Integer getFview() {
		return fview;
	}
	
	public void setFview(Integer fview) {
		this.fview = fview;
	}
	public String getUrl() {
		return url;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}

	public String getTypetemp() {
		return typetemp;
	}

	public void setTypetemp(String typetemp) {
		this.typetemp = typetemp;
	}

	public String getInfotemp() {
		return infotemp;
	}

	public void setInfotemp(String infotemp) {
		this.infotemp = infotemp;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getTypezt() {
		return typezt;
	}

	public void setTypezt(Integer typezt) {
		this.typezt = typezt;
	}

	public Integer getInfozt() {
		return infozt;
	}

	public void setInfozt(Integer infozt) {
		this.infozt = infozt;
	}
	
}
